Preserving the Glyphs Shape
Most glyphs in an alphabetic font fit between the ascent line and the descent
line, which roughly mark (respectively) the tops of the uppercase letters and
the bottoms of the descenders. One aim of outline fonts is to provide glyphs that
are more accurate renditions of the original typeface design, and there are
glyphs in some typefaces that exceed the ascent or descent line (or both). An
example of this type of glyph is an uppercase letter with an accent on it: “N”
with a tilde produces “Ñ”. Your application should preserve the original shape
of a glyph, because many languages use glyphs that extend beyond the ascent
line or descent line.
However, these glyphs may disturb the line spacing in a line or a paragraph.
The glyph that exceeds the ascent line on one line may cross the descent line of
the line above it, where it may overwrite a glyph that has a descender. You can
determine if there are outline glyphs that exceed the ascent and descent lines
maximum and minimum y- values for whatever glyphs you choose. You can get
the values of the ascent and descent lines using the GetFontInfo function or FontMetrics function. If a glyph's maximum or minimum y- values are greater than, respectively, the ascent or descent lines, you can opt for one of
two paths of action: you can change the height of the glyph, or you can change
the line spacing to accommodate the glyph.
The Font Manager's default behavior is to change the height of the glyph, so as to provide compatibility with bitmapped fonts, which are scaled between the
ascent and descent lines. The next figure shows the difference between an “Ñ”
scaled to fit in the same amount of space as an “N” and an other, well-formed
“Ñ”. The tilde on the preserved “Ñ” clearly exceeds the ascent line.
The difference between a scaled glyph and a preserved glyph
the preserveGlyph parameter, the Font Manager keeps the shape of the returns a setting that indicates whether the Font Manager maintains the form of TrueType glyphs, and you should save the setting with the current this value so that the Font Manager scales the glyphs appropriately.